home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume2 / pbm / Part3 < prev    next >
Encoding:
Internet Message Format  |  1991-08-07  |  32.1 KB

  1. From: jef@webster.UUCP (Jef Poskanzer)
  2. Newsgroups: comp.sources.misc
  3. Subject: v02i080: pbm - Portable Bitmap programs, Part 3/4
  4. Message-ID: <8803292002.AA24563@webster.sybase.uucp>
  5. Date: 29 Mar 88 20:02:55 GMT
  6. Approved: allbery@ncoast.UUCP
  7.  
  8. comp.sources.misc: Volume 2, Issue 80
  9. Submitted-By: "Jef Poskanzer" <jef@webster.UUCP>
  10. Archive-Name: pbm/Part3
  11.  
  12. #! /bin/sh
  13. # This is a shell archive, meaning:
  14. # 1. Remove everything above the #! /bin/sh line.
  15. # 2. Save the resulting text in a file.
  16. # 3. Execute the file with /bin/sh (not csh) to create the files:
  17. #    pbmtoxbm.c
  18. #    pbmtoxbm.man
  19. #    pbmtox10bm.c
  20. #    pbmtox10bm.man
  21. #    pbmtoascii.c
  22. #    pbmtoascii.man
  23. #    pbmcatlr.c
  24. #    pbmcatlr.man
  25. #    pbmcattb.c
  26. #    pbmcattb.man
  27. #    pbmfliplr.c
  28. #    pbmfliplr.man
  29. #    pbmfliptb.c
  30. #    pbmfliptb.man
  31. #    pbminvert.c
  32. #    pbminvert.man
  33. # This archive created: Mon Mar 28 12:12:09 1988
  34. # By:    Jef Poskanzer (Paratheo-Anametamystikhood Of Eris Esoteric, Ada Lovelace Cabal)
  35. export PATH; PATH=/bin:$PATH
  36. echo shar: extracting "'pbmtoxbm.c'" '(2620 characters)'
  37. if test -f 'pbmtoxbm.c'
  38. then
  39.     echo shar: will not over-write existing file "'pbmtoxbm.c'"
  40. else
  41. sed 's/^X//' << \SHAR_EOF > 'pbmtoxbm.c'
  42. X/* pbmtoxbm.c - read a portable bitmap and produce an X11 bitmap file
  43. X**
  44. X** Copyright (C) 1988 by Jef Poskanzer.
  45. X**
  46. X** Permission to use, copy, modify, and distribute this software and its
  47. X** documentation for any purpose and without fee is hereby granted, provided
  48. X** that the above copyright notice appear in all copies and that both that
  49. X** copyright notice and this permission notice appear in supporting
  50. X** documentation.  This software is provided "as is" without express or
  51. X** implied warranty.
  52. X*/
  53. X
  54. X#include <stdio.h>
  55. X#ifdef    OS_SYSV
  56. X#include <string.h>
  57. X#else    OS_SYSV
  58. X#include <strings.h>
  59. X#endif    OS_SYSV
  60. X#include "pbm.h"
  61. X
  62. Xmain( argc, argv )
  63. Xint argc;
  64. Xchar *argv[];
  65. X    {
  66. X    FILE *ifd;
  67. X    bit **bits;
  68. X    int rows, cols, rucols, padright, row, col;
  69. X    char name[100], *cp;
  70. X
  71. X    if ( argc > 2 )
  72. X    {
  73. X    fprintf( stderr, "usage:  %s [pbmfile]\n", argv[0] );
  74. X    exit( 1 );
  75. X    }
  76. X
  77. X    if ( argc == 2 )
  78. X    {
  79. X        ifd = fopen( argv[1], "r" );
  80. X        if ( ifd == NULL )
  81. X        {
  82. X        fprintf( stderr, "%s: can't open.\n", argv[1] );
  83. X        exit( 1 );
  84. X        }
  85. X    strcpy( name, argv[1] );
  86. X
  87. X#ifdef    OS_SYSV
  88. X    if ( ( cp = strchr( name, '.' ) ) != 0 )
  89. X#else    OS_SYSV
  90. X    if ( ( cp = index( name, '.' ) ) != 0 )
  91. X#endif    OS_SYSV
  92. X        *cp = '\0';
  93. X    }
  94. X    else
  95. X    {
  96. X    ifd = stdin;
  97. X    strcpy( name, "noname" );
  98. X    }
  99. X
  100. X    bits = pbm_readpbm( ifd, &cols, &rows );
  101. X
  102. X    if ( ifd != stdin )
  103. X    fclose( ifd );
  104. X    
  105. X    /* Round cols up to the nearest multiple of 8. */
  106. X    rucols = ( cols + 7 ) / 8;
  107. X    rucols = rucols * 8;
  108. X    padright = rucols - cols;
  109. X
  110. X    printf( "#define %s_width %d\n", name, cols );
  111. X    printf( "#define %s_height %d\n", name, rows );
  112. X    printf( "static char %s_bits[] = {\n", name );
  113. X
  114. X    putinit( );
  115. X    for ( row = 0; row < rows; row++ )
  116. X    {
  117. X        for ( col = 0; col < cols; col++ )
  118. X        putbit( bits[row][col] );
  119. X    for ( col = 0; col < padright; col++ )
  120. X        putbit( 0 );
  121. X        }
  122. X    putrest( );
  123. X
  124. X    exit( 0 );
  125. X    }
  126. X
  127. X
  128. Xint item, bitsperitem, bitshift, itemsperline, firstitem;
  129. X
  130. Xputinit( )
  131. X    {
  132. X    itemsperline = 0;
  133. X    bitsperitem = 0;
  134. X    item = 0;
  135. X    bitshift = 0;
  136. X    firstitem = 1;
  137. X    }
  138. X
  139. Xputbit( b )
  140. Xbit b;
  141. X    {
  142. X    if ( bitsperitem == 8 )
  143. X    putitem( );
  144. X    bitsperitem++;
  145. X    if ( b )
  146. X    item += 1 << bitshift;
  147. X    bitshift++;
  148. X    }
  149. X
  150. Xputrest( )
  151. X    {
  152. X    if ( bitsperitem > 0 )
  153. X    putitem( );
  154. X    printf( "};\n" );
  155. X    }
  156. X
  157. Xputitem( )
  158. X    {
  159. X    if ( firstitem )
  160. X    firstitem = 0;
  161. X    else
  162. X    printf( "," );
  163. X    if ( itemsperline == 15 )
  164. X    {
  165. X    putchar( '\n' );
  166. X    itemsperline = 0;
  167. X    }
  168. X    if ( itemsperline == 0 )
  169. X    printf( " " );
  170. X    itemsperline++;
  171. X    printf( "0x%02x", item );
  172. X    bitsperitem = 0;
  173. X    item = 0;
  174. X    bitshift = 0;
  175. X    }
  176. SHAR_EOF
  177. if test 2620 -ne "`wc -c < 'pbmtoxbm.c'`"
  178. then
  179.     echo shar: error transmitting "'pbmtoxbm.c'" '(should have been 2620 characters)'
  180. fi
  181. fi # end of overwriting check
  182. echo shar: extracting "'pbmtoxbm.man'" '(962 characters)'
  183. if test -f 'pbmtoxbm.man'
  184. then
  185.     echo shar: will not over-write existing file "'pbmtoxbm.man'"
  186. else
  187. sed 's/^X//' << \SHAR_EOF > 'pbmtoxbm.man'
  188. X.TH pbmtoxbm 1 "13 February 1988"
  189. X.SH NAME
  190. Xpbmtoxbm - convert portable bitmaps into X11 bitmaps
  191. X.SH SYNOPSIS
  192. Xpbmtoxbm [pbmfile]
  193. X.SH DESCRIPTION
  194. XReads a portable bitmap as input.
  195. XProduces an X11 bitmap as output.
  196. X.SH "SEE ALSO"
  197. Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
  198. Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
  199. Xpbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
  200. Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
  201. Xpbmpaste(1), pbmenlarge(1)
  202. X.SH AUTHOR
  203. XCopyright (C) 1988 by Jef Poskanzer.
  204. X
  205. XPermission to use, copy, modify, and distribute this software and its
  206. Xdocumentation for any purpose and without fee is hereby granted, provided
  207. Xthat the above copyright notice appear in all copies and that both that
  208. Xcopyright notice and this permission notice appear in supporting
  209. Xdocumentation.  This software is provided "as is" without express or
  210. Ximplied warranty.
  211. SHAR_EOF
  212. if test 962 -ne "`wc -c < 'pbmtoxbm.man'`"
  213. then
  214.     echo shar: error transmitting "'pbmtoxbm.man'" '(should have been 962 characters)'
  215. fi
  216. fi # end of overwriting check
  217. echo shar: extracting "'pbmtox10bm.c'" '(2628 characters)'
  218. if test -f 'pbmtox10bm.c'
  219. then
  220.     echo shar: will not over-write existing file "'pbmtox10bm.c'"
  221. else
  222. sed 's/^X//' << \SHAR_EOF > 'pbmtox10bm.c'
  223. X/* pbmtoxbm10.c - read a portable bitmap and produce an X10 bitmap file
  224. X**
  225. X** Copyright (C) 1988 by Jef Poskanzer.
  226. X**
  227. X** Permission to use, copy, modify, and distribute this software and its
  228. X** documentation for any purpose and without fee is hereby granted, provided
  229. X** that the above copyright notice appear in all copies and that both that
  230. X** copyright notice and this permission notice appear in supporting
  231. X** documentation.  This software is provided "as is" without express or
  232. X** implied warranty.
  233. X*/
  234. X
  235. X#include <stdio.h>
  236. X#ifdef    OS_SYSV
  237. X#include <string.h>
  238. X#else    OS_SYSV
  239. X#include <strings.h>
  240. X#endif    OS_SYSV
  241. X#include "pbm.h"
  242. X
  243. Xmain( argc, argv )
  244. Xint argc;
  245. Xchar *argv[];
  246. X    {
  247. X    FILE *ifd;
  248. X    bit **bits;
  249. X    int rows, cols, rucols, padright, row, col;
  250. X    char name[100], *cp;
  251. X
  252. X    if ( argc > 2 )
  253. X    {
  254. X    fprintf( stderr, "usage:  %s [pbmfile]\n", argv[0] );
  255. X    exit( 1 );
  256. X    }
  257. X
  258. X    if ( argc == 2 )
  259. X    {
  260. X        ifd = fopen( argv[1], "r" );
  261. X        if ( ifd == NULL )
  262. X        {
  263. X        fprintf( stderr, "%s: can't open.\n", argv[1] );
  264. X        exit( 1 );
  265. X        }
  266. X    strcpy( name, argv[1] );
  267. X
  268. X#ifdef    OS_SYSV
  269. X    if ( ( cp = strchr( name, '.' ) ) != 0 )
  270. X#else    OS_SYSV
  271. X    if ( ( cp = index( name, '.' ) ) != 0 )
  272. X#endif    OS_SYSV
  273. X        *cp = '\0';
  274. X    }
  275. X    else
  276. X    {
  277. X    ifd = stdin;
  278. X    strcpy( name, "noname" );
  279. X    }
  280. X
  281. X    bits = pbm_readpbm( ifd, &cols, &rows );
  282. X
  283. X    if ( ifd != stdin )
  284. X    fclose( ifd );
  285. X    
  286. X    /* Round cols up to the nearest multiple of 16. */
  287. X    rucols = ( cols + 15 ) / 16;
  288. X    rucols = rucols * 16;
  289. X    padright = rucols - cols;
  290. X
  291. X    printf( "#define %s_width %d\n", name, cols );
  292. X    printf( "#define %s_height %d\n", name, rows );
  293. X    printf( "static short %s_bits[] = {\n", name );
  294. X
  295. X    putinit( );
  296. X    for ( row = 0; row < rows; row++ )
  297. X    {
  298. X        for ( col = 0; col < cols; col++ )
  299. X        putbit( bits[row][col] );
  300. X    for ( col = 0; col < padright; col++ )
  301. X        putbit( 0 );
  302. X        }
  303. X    putrest( );
  304. X
  305. X    exit( 0 );
  306. X    }
  307. X
  308. X
  309. Xint item, bitsperitem, bitshift, itemsperline, firstitem;
  310. X
  311. Xputinit( )
  312. X    {
  313. X    itemsperline = 0;
  314. X    bitsperitem = 0;
  315. X    item = 0;
  316. X    bitshift = 0;
  317. X    firstitem = 1;
  318. X    }
  319. X
  320. Xputbit( b )
  321. Xbit b;
  322. X    {
  323. X    if ( bitsperitem == 16 )
  324. X    putitem( );
  325. X    bitsperitem++;
  326. X    if ( b )
  327. X    item += 1 << bitshift;
  328. X    bitshift++;
  329. X    }
  330. X
  331. Xputrest( )
  332. X    {
  333. X    if ( bitsperitem > 0 )
  334. X    putitem( );
  335. X    printf( "};\n" );
  336. X    }
  337. X
  338. Xputitem( )
  339. X    {
  340. X    if ( firstitem )
  341. X    firstitem = 0;
  342. X    else
  343. X    printf( "," );
  344. X    if ( itemsperline == 11 )
  345. X    {
  346. X    putchar( '\n' );
  347. X    itemsperline = 0;
  348. X    }
  349. X    if ( itemsperline == 0 )
  350. X    printf( " " );
  351. X    itemsperline++;
  352. X    printf( "0x%04x", item );
  353. X    bitsperitem = 0;
  354. X    item = 0;
  355. X    bitshift = 0;
  356. X    }
  357. SHAR_EOF
  358. if test 2628 -ne "`wc -c < 'pbmtox10bm.c'`"
  359. then
  360.     echo shar: error transmitting "'pbmtox10bm.c'" '(should have been 2628 characters)'
  361. fi
  362. fi # end of overwriting check
  363. echo shar: extracting "'pbmtox10bm.man'" '(1106 characters)'
  364. if test -f 'pbmtox10bm.man'
  365. then
  366.     echo shar: will not over-write existing file "'pbmtox10bm.man'"
  367. else
  368. sed 's/^X//' << \SHAR_EOF > 'pbmtox10bm.man'
  369. X.TH pbmtox10bm 1 "13 February 1988"
  370. X.SH NAME
  371. Xpbmtox10bm - convert portable bitmaps into X10 bitmaps
  372. X.SH SYNOPSIS
  373. Xpbmtoxbm [pbmfile]
  374. X.SH DESCRIPTION
  375. XReads a portable bitmap as input.
  376. XProduces an X10 bitmap as output.
  377. XThis older format is maintained for compatibility.
  378. XNote that there is no
  379. Xx10bmtopbm
  380. Xtool, because
  381. Xxbmtopbm
  382. Xcan read both X11 and X10 bitmaps.
  383. X.SH "SEE ALSO"
  384. Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
  385. Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
  386. Xpbmtoxbm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
  387. Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
  388. Xpbmpaste(1), pbmenlarge(1)
  389. X.SH AUTHOR
  390. XCopyright (C) 1988 by Jef Poskanzer.
  391. X
  392. XPermission to use, copy, modify, and distribute this software and its
  393. Xdocumentation for any purpose and without fee is hereby granted, provided
  394. Xthat the above copyright notice appear in all copies and that both that
  395. Xcopyright notice and this permission notice appear in supporting
  396. Xdocumentation.  This software is provided "as is" without express or
  397. Ximplied warranty.
  398. SHAR_EOF
  399. if test 1106 -ne "`wc -c < 'pbmtox10bm.man'`"
  400. then
  401.     echo shar: error transmitting "'pbmtox10bm.man'" '(should have been 1106 characters)'
  402. fi
  403. fi # end of overwriting check
  404. echo shar: extracting "'pbmtoascii.c'" '(1670 characters)'
  405. if test -f 'pbmtoascii.c'
  406. then
  407.     echo shar: will not over-write existing file "'pbmtoascii.c'"
  408. else
  409. sed 's/^X//' << \SHAR_EOF > 'pbmtoascii.c'
  410. X/* pbmtoascii.c - read a portable bitmap and produce ASCII graphics
  411. X**
  412. X** Copyright (C) 1988 by Jef Poskanzer.
  413. X**
  414. X** Permission to use, copy, modify, and distribute this software and its
  415. X** documentation for any purpose and without fee is hereby granted, provided
  416. X** that the above copyright notice appear in all copies and that both that
  417. X** copyright notice and this permission notice appear in supporting
  418. X** documentation.  This software is provided "as is" without express or
  419. X** implied warranty.
  420. X*/
  421. X
  422. X#include <stdio.h>
  423. X#include "pbm.h"
  424. X
  425. Xmain( argc, argv )
  426. Xint argc;
  427. Xchar *argv[];
  428. X    {
  429. X    FILE *ifd;
  430. X    bit **bits;
  431. X    int rows, cols, row, col, lastcol;
  432. X
  433. X    if ( argc > 2 )
  434. X    {
  435. X    fprintf( stderr, "usage:  %s [pbmfile]\n", argv[0] );
  436. X    exit( 1 );
  437. X    }
  438. X
  439. X    if ( argc == 2 )
  440. X    {
  441. X        ifd = fopen( argv[1], "r" );
  442. X        if ( ifd == NULL )
  443. X        {
  444. X        fprintf( stderr, "%s: can't open.\n", argv[1] );
  445. X        exit( 1 );
  446. X        }
  447. X    }
  448. X    else
  449. X    ifd = stdin;
  450. X
  451. X    bits = pbm_readpbm( ifd, &cols, &rows );
  452. X
  453. X    if ( ifd != stdin )
  454. X    fclose( ifd );
  455. X    
  456. X    /* Write out rows by twos. */
  457. X    for ( row = 0; row < rows; row += 2 )
  458. X    {
  459. X    /* Find end of lines. */
  460. X    for ( lastcol = cols-1; lastcol > 0; lastcol-- )
  461. X        {
  462. X        if ( bits[row][lastcol] )
  463. X        break;
  464. X        if ( row+1 < rows && bits[row+1][lastcol] )
  465. X        break;
  466. X        }
  467. X        for ( col = 0; col <= lastcol; col++ )
  468. X        {
  469. X        if ( ! bits[row][col] )
  470. X        {
  471. X        if ( row+1 >= rows || ! bits[row+1][col] )
  472. X            putchar( ' ' );
  473. X        else
  474. X            putchar( 'o' );
  475. X        }
  476. X        else
  477. X        {
  478. X        if ( row+1 >= rows || ! bits[row+1][col] )
  479. X            putchar( '"' );
  480. X        else
  481. X            putchar( '$' );
  482. X        }
  483. X        }
  484. X    putchar( '\n' );
  485. X        }
  486. X
  487. X    exit( 0 );
  488. X    }
  489. SHAR_EOF
  490. if test 1670 -ne "`wc -c < 'pbmtoascii.c'`"
  491. then
  492.     echo shar: error transmitting "'pbmtoascii.c'" '(should have been 1670 characters)'
  493. fi
  494. fi # end of overwriting check
  495. echo shar: extracting "'pbmtoascii.man'" '(1058 characters)'
  496. if test -f 'pbmtoascii.man'
  497. then
  498.     echo shar: will not over-write existing file "'pbmtoascii.man'"
  499. else
  500. sed 's/^X//' << \SHAR_EOF > 'pbmtoascii.man'
  501. X.TH pbmtoascii 1 "13 February 1988"
  502. X.SH NAME
  503. Xpbmtoascii - convert portable bitmaps into ASCII graphics
  504. X.SH SYNOPSIS
  505. Xpbmtoascii [pbmfile]
  506. X.SH DESCRIPTION
  507. XReads a portable bitmap as input.
  508. XProduces a somewhat crude ASCII graphic as output.
  509. XNote that there is no
  510. Xasciitopbm
  511. Xtool - this transformation is one-way.
  512. X.SH "SEE ALSO"
  513. Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
  514. Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
  515. Xpbmtoxbm(1), pbmtox10bm(1), pbminvert(1), pbmfliplr(1),
  516. Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
  517. Xpbmpaste(1), pbmenlarge(1)
  518. X.SH AUTHOR
  519. XCopyright (C) 1988 by Jef Poskanzer.
  520. X
  521. XPermission to use, copy, modify, and distribute this software and its
  522. Xdocumentation for any purpose and without fee is hereby granted, provided
  523. Xthat the above copyright notice appear in all copies and that both that
  524. Xcopyright notice and this permission notice appear in supporting
  525. Xdocumentation.  This software is provided "as is" without express or
  526. Ximplied warranty.
  527. SHAR_EOF
  528. if test 1058 -ne "`wc -c < 'pbmtoascii.man'`"
  529. then
  530.     echo shar: error transmitting "'pbmtoascii.man'" '(should have been 1058 characters)'
  531. fi
  532. fi # end of overwriting check
  533. echo shar: extracting "'pbmcatlr.c'" '(2757 characters)'
  534. if test -f 'pbmcatlr.c'
  535. then
  536.     echo shar: will not over-write existing file "'pbmcatlr.c'"
  537. else
  538. sed 's/^X//' << \SHAR_EOF > 'pbmcatlr.c'
  539. X/* pbmcatlr.c - concatenate portable bitmaps left to right
  540. X**
  541. X** Copyright (C) 1988 by Jef Poskanzer.
  542. X**
  543. X** Permission to use, copy, modify, and distribute this software and its
  544. X** documentation for any purpose and without fee is hereby granted, provided
  545. X** that the above copyright notice appear in all copies and that both that
  546. X** copyright notice and this permission notice appear in supporting
  547. X** documentation.  This software is provided "as is" without express or
  548. X** implied warranty.
  549. X*/
  550. X
  551. X#include <stdio.h>
  552. X#include "pbm.h"
  553. X
  554. X#define MAXFILES 100
  555. X
  556. Xmain( argc, argv )
  557. Xint argc;
  558. Xchar *argv[];
  559. X    {
  560. X    FILE *ifd[MAXFILES];
  561. X    bit **bits[MAXFILES], **newbits, background;
  562. X    int argn, backdefault, nfiles, i, c;
  563. X    int rows[MAXFILES], cols[MAXFILES], row, col;
  564. X    int newrows, newcols, newcol, padtop;
  565. X    char *usage = "usage:  %s [-0] [-1] pbmfile pbmfile ...\n";
  566. X
  567. X    argn = 1;
  568. X    backdefault = 1;
  569. X
  570. X    /* Check for flags. */
  571. X    if ( argc > argn )
  572. X    {
  573. X    if ( argv[argn][0] == '-' )
  574. X        {
  575. X        if ( strcmp( argv[argn], "-0" ) == 0 )
  576. X        {
  577. X        backdefault = 0;
  578. X        background = 0;
  579. X        argn++;
  580. X        }
  581. X        else if ( strcmp( argv[argn], "-1" ) == 0 )
  582. X        {
  583. X        backdefault = 0;
  584. X        background = 1;
  585. X        argn++;
  586. X        }
  587. X        else
  588. X        {
  589. X        fprintf( stderr, usage, argv[0] );
  590. X        exit( 1 );
  591. X        }
  592. X        }
  593. X    }
  594. X
  595. X    if ( argc > argn )
  596. X    {
  597. X    nfiles = argc - argn;
  598. X    for ( i = 0; i < nfiles; i++ )
  599. X        {
  600. X        if ( strcmp( argv[argn+i], "-" ) == 0 )
  601. X        ifd[i] = stdin;
  602. X        else
  603. X        {
  604. X        ifd[i] = fopen( argv[argn+i], "r" );
  605. X        if ( ifd[i] == NULL )
  606. X            {
  607. X            fprintf( stderr, "%s: can't open.\n", argv[argn+i] );
  608. X            exit( 1 );
  609. X            }
  610. X        }
  611. X        }
  612. X    }
  613. X    else
  614. X    {
  615. X    nfiles = 1;
  616. X    ifd[0] = stdin;
  617. X    }
  618. X
  619. X    newcols = 0;
  620. X    newrows = 0;
  621. X    for ( i = 0; i < nfiles; i++ )
  622. X    {
  623. X    bits[i] = pbm_readpbm( ifd[i], &cols[i], &rows[i] );
  624. X    if ( ifd[i] != stdin )
  625. X        fclose( ifd[i] );
  626. X    newcols += cols[i];
  627. X    if ( rows[i] > newrows )
  628. X        newrows = rows[i];
  629. X    }
  630. X
  631. X    newbits = pbm_allocarray( newcols, newrows );
  632. X
  633. X    newcol = 0;
  634. X
  635. X    for ( i = 0; i < nfiles; i++ )
  636. X    {
  637. X    if ( backdefault )
  638. X        {
  639. X        /* Make a reasonable guess as to what the background is. */
  640. X        c = (int) bits[i][0][0] + (int) bits[i][0][cols[i]-1] +
  641. X        (int) bits[i][rows[i]-1][0] +
  642. X        (int) bits[i][rows[i]-1][cols[i]-1];
  643. X        background = ( c <= 2 ) ? 0 : 1;
  644. X        }
  645. X
  646. X    padtop = (newrows - rows[i]) / 2;
  647. X
  648. X    for ( col = 0; col <= cols[i]; col++ )
  649. X        {
  650. X        for ( row = 0; row < padtop; row++ )
  651. X        newbits[row][newcol+col] = background;
  652. X        for ( row = 0; row < rows[i]; row++ )
  653. X        newbits[padtop+row][newcol+col] = bits[i][row][col];
  654. X        for ( row = padtop+rows[i]; row < newrows; row++ )
  655. X        newbits[row][newcol+col] = background;
  656. X        }
  657. X
  658. X    newcol += cols[i];
  659. X    }
  660. X
  661. X    pbm_writepbm( stdout, newbits, newcols, newrows );
  662. X
  663. X    exit( 0 );
  664. X    }
  665. SHAR_EOF
  666. if test 2757 -ne "`wc -c < 'pbmcatlr.c'`"
  667. then
  668.     echo shar: error transmitting "'pbmcatlr.c'" '(should have been 2757 characters)'
  669. fi
  670. fi # end of overwriting check
  671. echo shar: extracting "'pbmcatlr.man'" '(1278 characters)'
  672. if test -f 'pbmcatlr.man'
  673. then
  674.     echo shar: will not over-write existing file "'pbmcatlr.man'"
  675. else
  676. sed 's/^X//' << \SHAR_EOF > 'pbmcatlr.man'
  677. X.TH pbmcatlr 1 "13 February 1988"
  678. X.SH NAME
  679. Xpbmcatlr - concatenate portable bitmaps left to right
  680. X.SH SYNOPSIS
  681. Xpbmcatlr [-0] [-1] pbmfile pbmfile ...
  682. X.SH DESCRIPTION
  683. XReads portable bitmaps as input.
  684. XConcatenates them left to right and produces a portable bitmap as output.
  685. XIf the bitmaps are not all the same height, the shorter ones are centered
  686. Xvertically with the edges filled in.
  687. XThe -0 and -1 flags specify what color to use for this fill -- if neither
  688. Xis specified, the program makes a guess as to which would look better.
  689. X.SH "SEE ALSO"
  690. Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
  691. Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
  692. Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
  693. Xpbmfliptb(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
  694. Xpbmpaste(1), pbmenlarge(1)
  695. X.SH AUTHOR
  696. XCopyright (C) 1988 by Jef Poskanzer.
  697. X
  698. XPermission to use, copy, modify, and distribute this software and its
  699. Xdocumentation for any purpose and without fee is hereby granted, provided
  700. Xthat the above copyright notice appear in all copies and that both that
  701. Xcopyright notice and this permission notice appear in supporting
  702. Xdocumentation.  This software is provided "as is" without express or
  703. Ximplied warranty.
  704. SHAR_EOF
  705. if test 1278 -ne "`wc -c < 'pbmcatlr.man'`"
  706. then
  707.     echo shar: error transmitting "'pbmcatlr.man'" '(should have been 1278 characters)'
  708. fi
  709. fi # end of overwriting check
  710. echo shar: extracting "'pbmcattb.c'" '(2762 characters)'
  711. if test -f 'pbmcattb.c'
  712. then
  713.     echo shar: will not over-write existing file "'pbmcattb.c'"
  714. else
  715. sed 's/^X//' << \SHAR_EOF > 'pbmcattb.c'
  716. X/* pbmcattb.c - concatenate portable bitmaps top to bottom
  717. X**
  718. X** Copyright (C) 1988 by Jef Poskanzer.
  719. X**
  720. X** Permission to use, copy, modify, and distribute this software and its
  721. X** documentation for any purpose and without fee is hereby granted, provided
  722. X** that the above copyright notice appear in all copies and that both that
  723. X** copyright notice and this permission notice appear in supporting
  724. X** documentation.  This software is provided "as is" without express or
  725. X** implied warranty.
  726. X*/
  727. X
  728. X#include <stdio.h>
  729. X#include "pbm.h"
  730. X
  731. X#define MAXFILES 100
  732. X
  733. Xmain( argc, argv )
  734. Xint argc;
  735. Xchar *argv[];
  736. X    {
  737. X    FILE *ifd[MAXFILES];
  738. X    bit **bits[MAXFILES], **newbits, background;
  739. X    int argn, backdefault, nfiles, i, c;
  740. X    int rows[MAXFILES], cols[MAXFILES], row, col;
  741. X    int newrows, newcols, newrow, padleft;
  742. X    char *usage = "usage:  %s [-0] [-1] pbmfile pbmfile ...\n";
  743. X
  744. X    argn = 1;
  745. X    backdefault = 1;
  746. X
  747. X    /* Check for flags. */
  748. X    if ( argc > argn )
  749. X    {
  750. X    if ( argv[argn][0] == '-' )
  751. X        {
  752. X        if ( strcmp( argv[argn], "-0" ) == 0 )
  753. X        {
  754. X        backdefault = 0;
  755. X        background = 0;
  756. X        argn++;
  757. X        }
  758. X        else if ( strcmp( argv[argn], "-1" ) == 0 )
  759. X        {
  760. X        backdefault = 0;
  761. X        background = 1;
  762. X        argn++;
  763. X        }
  764. X        else
  765. X        {
  766. X        fprintf( stderr, usage, argv[0] );
  767. X        exit( 1 );
  768. X        }
  769. X        }
  770. X    }
  771. X
  772. X    if ( argc > argn )
  773. X    {
  774. X    nfiles = argc - argn;
  775. X    for ( i = 0; i < nfiles; i++ )
  776. X        {
  777. X        if ( strcmp( argv[argn+i], "-" ) == 0 )
  778. X        ifd[i] = stdin;
  779. X        else
  780. X        {
  781. X        ifd[i] = fopen( argv[argn+i], "r" );
  782. X        if ( ifd[i] == NULL )
  783. X            {
  784. X            fprintf( stderr, "%s: can't open.\n", argv[argn+i] );
  785. X            exit( 1 );
  786. X            }
  787. X        }
  788. X        }
  789. X    }
  790. X    else
  791. X    {
  792. X    nfiles = 1;
  793. X    ifd[0] = stdin;
  794. X    }
  795. X
  796. X    newcols = 0;
  797. X    newrows = 0;
  798. X    for ( i = 0; i < nfiles; i++ )
  799. X    {
  800. X    bits[i] = pbm_readpbm( ifd[i], &cols[i], &rows[i] );
  801. X    if ( ifd[i] != stdin )
  802. X        fclose( ifd[i] );
  803. X    if ( cols[i] > newcols )
  804. X        newcols = cols[i];
  805. X    newrows += rows[i];
  806. X    }
  807. X
  808. X    newbits = pbm_allocarray( newcols, newrows );
  809. X
  810. X    newrow = 0;
  811. X
  812. X    for ( i = 0; i < nfiles; i++ )
  813. X    {
  814. X    if ( backdefault )
  815. X        {
  816. X        /* Make a reasonable guess as to what the background is. */
  817. X        c = (int) bits[i][0][0] + (int) bits[i][0][cols[i]-1] +
  818. X        (int) bits[i][rows[i]-1][0] +
  819. X        (int) bits[i][rows[i]-1][cols[i]-1];
  820. X        background = ( c <= 2 ) ? 0 : 1;
  821. X        }
  822. X
  823. X    padleft = (newcols - cols[i]) / 2;
  824. X
  825. X    for ( row = 0; row < rows[i]; row++ )
  826. X        {
  827. X        for ( col = 0; col < padleft; col++ )
  828. X        newbits[newrow+row][col] = background;
  829. X        for ( col = 0; col <= cols[i]; col++ )
  830. X        newbits[newrow+row][padleft+col] = bits[i][row][col];
  831. X        for ( col = padleft+cols[i]; col < newcols; col++ )
  832. X        newbits[newrow+row][col] = background;
  833. X        }
  834. X
  835. X    newrow += rows[i];
  836. X    }
  837. X
  838. X    pbm_writepbm( stdout, newbits, newcols, newrows );
  839. X
  840. X    exit( 0 );
  841. X    }
  842. SHAR_EOF
  843. if test 2762 -ne "`wc -c < 'pbmcattb.c'`"
  844. then
  845.     echo shar: error transmitting "'pbmcattb.c'" '(should have been 2762 characters)'
  846. fi
  847. fi # end of overwriting check
  848. echo shar: extracting "'pbmcattb.man'" '(1280 characters)'
  849. if test -f 'pbmcattb.man'
  850. then
  851.     echo shar: will not over-write existing file "'pbmcattb.man'"
  852. else
  853. sed 's/^X//' << \SHAR_EOF > 'pbmcattb.man'
  854. X.TH pbmcattb 1 "13 February 1988"
  855. X.SH NAME
  856. Xpbmcattb - concatenate portable bitmaps top to bottom
  857. X.SH SYNOPSIS
  858. Xpbmcattb [-0] [-1] pbmfile pbmfile ...
  859. X.SH DESCRIPTION
  860. XReads portable bitmaps as input.
  861. XConcatenates them top to bottom and produces a portable bitmap as output.
  862. XIf the bitmaps are not all the same width, the narrower ones are centered
  863. Xhorizontally with the edges filled in.
  864. XThe -0 and -1 flags specify what color to use for this fill -- if neither
  865. Xis specified, the program makes a guess as to which would look better.
  866. X.SH "SEE ALSO"
  867. Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
  868. Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
  869. Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
  870. Xpbmfliptb(1), pbmcatlr(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
  871. Xpbmpaste(1), pbmenlarge(1)
  872. X.SH AUTHOR
  873. XCopyright (C) 1988 by Jef Poskanzer.
  874. X
  875. XPermission to use, copy, modify, and distribute this software and its
  876. Xdocumentation for any purpose and without fee is hereby granted, provided
  877. Xthat the above copyright notice appear in all copies and that both that
  878. Xcopyright notice and this permission notice appear in supporting
  879. Xdocumentation.  This software is provided "as is" without express or
  880. Ximplied warranty.
  881. SHAR_EOF
  882. if test 1280 -ne "`wc -c < 'pbmcattb.man'`"
  883. then
  884.     echo shar: error transmitting "'pbmcattb.man'" '(should have been 1280 characters)'
  885. fi
  886. fi # end of overwriting check
  887. echo shar: extracting "'pbmfliplr.c'" '(1305 characters)'
  888. if test -f 'pbmfliplr.c'
  889. then
  890.     echo shar: will not over-write existing file "'pbmfliplr.c'"
  891. else
  892. sed 's/^X//' << \SHAR_EOF > 'pbmfliplr.c'
  893. X/* pbmfliplr.c - read a portable bitmap and flip it left for right
  894. X**
  895. X** Copyright (C) 1988 by Jef Poskanzer.
  896. X**
  897. X** Permission to use, copy, modify, and distribute this software and its
  898. X** documentation for any purpose and without fee is hereby granted, provided
  899. X** that the above copyright notice appear in all copies and that both that
  900. X** copyright notice and this permission notice appear in supporting
  901. X** documentation.  This software is provided "as is" without express or
  902. X** implied warranty.
  903. X*/
  904. X
  905. X#include <stdio.h>
  906. X#include "pbm.h"
  907. X
  908. Xmain( argc, argv )
  909. Xint argc;
  910. Xchar *argv[];
  911. X    {
  912. X    FILE *ifd;
  913. X    bit **bits, b;
  914. X    int rows, cols, row, col;
  915. X
  916. X    if ( argc > 2 )
  917. X    {
  918. X    fprintf( stderr, "usage:  %s [pbmfile]\n", argv[0] );
  919. X    exit( 1 );
  920. X    }
  921. X
  922. X    if ( argc == 2 )
  923. X    {
  924. X        ifd = fopen( argv[1], "r" );
  925. X        if ( ifd == NULL )
  926. X        {
  927. X        fprintf( stderr, "%s: can't open.\n", argv[1] );
  928. X        exit( 1 );
  929. X        }
  930. X    }
  931. X    else
  932. X    ifd = stdin;
  933. X
  934. X    bits = pbm_readpbm( ifd, &cols, &rows );
  935. X
  936. X    if ( ifd != stdin )
  937. X    fclose( ifd );
  938. X
  939. X    for ( row = 0; row < rows; row++ )
  940. X        for ( col = 0; col < cols / 2; col++ )
  941. X        {
  942. X        b = bits[row][col];
  943. X        bits[row][col] = bits[row][cols-col-1];
  944. X        bits[row][cols-col-1] = b;
  945. X        }
  946. X
  947. X    pbm_writepbm( stdout, bits, cols, rows );
  948. X
  949. X    exit( 0 );
  950. X    }
  951. SHAR_EOF
  952. if test 1305 -ne "`wc -c < 'pbmfliplr.c'`"
  953. then
  954.     echo shar: error transmitting "'pbmfliplr.c'" '(should have been 1305 characters)'
  955. fi
  956. fi # end of overwriting check
  957. echo shar: extracting "'pbmfliplr.man'" '(992 characters)'
  958. if test -f 'pbmfliplr.man'
  959. then
  960.     echo shar: will not over-write existing file "'pbmfliplr.man'"
  961. else
  962. sed 's/^X//' << \SHAR_EOF > 'pbmfliplr.man'
  963. X.TH pbmfliplr 1 "13 February 1988"
  964. X.SH NAME
  965. Xpbmfliplr - flip a portable bitmap left for right
  966. X.SH SYNOPSIS
  967. Xpbmfliplr [pbmfile]
  968. X.SH DESCRIPTION
  969. XReads a portable bitmap as input.
  970. XFlips it left for right and produces a portable bitmap as output.
  971. X.SH "SEE ALSO"
  972. Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
  973. Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
  974. Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1),
  975. Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
  976. Xpbmpaste(1), pbmenlarge(1)
  977. X.SH AUTHOR
  978. XCopyright (C) 1988 by Jef Poskanzer.
  979. X
  980. XPermission to use, copy, modify, and distribute this software and its
  981. Xdocumentation for any purpose and without fee is hereby granted, provided
  982. Xthat the above copyright notice appear in all copies and that both that
  983. Xcopyright notice and this permission notice appear in supporting
  984. Xdocumentation.  This software is provided "as is" without express or
  985. Ximplied warranty.
  986. SHAR_EOF
  987. if test 992 -ne "`wc -c < 'pbmfliplr.man'`"
  988. then
  989.     echo shar: error transmitting "'pbmfliplr.man'" '(should have been 992 characters)'
  990. fi
  991. fi # end of overwriting check
  992. echo shar: extracting "'pbmfliptb.c'" '(1305 characters)'
  993. if test -f 'pbmfliptb.c'
  994. then
  995.     echo shar: will not over-write existing file "'pbmfliptb.c'"
  996. else
  997. sed 's/^X//' << \SHAR_EOF > 'pbmfliptb.c'
  998. X/* pbmfliptb.c - read a portable bitmap and flip it top for bottom
  999. X**
  1000. X** Copyright (C) 1988 by Jef Poskanzer.
  1001. X**
  1002. X** Permission to use, copy, modify, and distribute this software and its
  1003. X** documentation for any purpose and without fee is hereby granted, provided
  1004. X** that the above copyright notice appear in all copies and that both that
  1005. X** copyright notice and this permission notice appear in supporting
  1006. X** documentation.  This software is provided "as is" without express or
  1007. X** implied warranty.
  1008. X*/
  1009. X
  1010. X#include <stdio.h>
  1011. X#include "pbm.h"
  1012. X
  1013. Xmain( argc, argv )
  1014. Xint argc;
  1015. Xchar *argv[];
  1016. X    {
  1017. X    FILE *ifd;
  1018. X    bit **bits, b;
  1019. X    int rows, cols, row, col;
  1020. X
  1021. X    if ( argc > 2 )
  1022. X    {
  1023. X    fprintf( stderr, "usage:  %s [pbmfile]\n", argv[0] );
  1024. X    exit( 1 );
  1025. X    }
  1026. X
  1027. X    if ( argc == 2 )
  1028. X    {
  1029. X        ifd = fopen( argv[1], "r" );
  1030. X        if ( ifd == NULL )
  1031. X        {
  1032. X        fprintf( stderr, "%s: can't open.\n", argv[1] );
  1033. X        exit( 1 );
  1034. X        }
  1035. X    }
  1036. X    else
  1037. X    ifd = stdin;
  1038. X
  1039. X    bits = pbm_readpbm( ifd, &cols, &rows );
  1040. X
  1041. X    if ( ifd != stdin )
  1042. X    fclose( ifd );
  1043. X
  1044. X    for ( row = 0; row < rows / 2; row++ )
  1045. X        for ( col = 0; col < cols; col++ )
  1046. X        {
  1047. X        b = bits[row][col];
  1048. X        bits[row][col] = bits[rows-row-1][col];
  1049. X        bits[rows-row-1][col] = b;
  1050. X        }
  1051. X
  1052. X    pbm_writepbm( stdout, bits, cols, rows );
  1053. X
  1054. X    exit( 0 );
  1055. X    }
  1056. SHAR_EOF
  1057. if test 1305 -ne "`wc -c < 'pbmfliptb.c'`"
  1058. then
  1059.     echo shar: error transmitting "'pbmfliptb.c'" '(should have been 1305 characters)'
  1060. fi
  1061. fi # end of overwriting check
  1062. echo shar: extracting "'pbmfliptb.man'" '(992 characters)'
  1063. if test -f 'pbmfliptb.man'
  1064. then
  1065.     echo shar: will not over-write existing file "'pbmfliptb.man'"
  1066. else
  1067. sed 's/^X//' << \SHAR_EOF > 'pbmfliptb.man'
  1068. X.TH pbmfliptb 1 "13 February 1988"
  1069. X.SH NAME
  1070. Xpbmfliptb - flip a portable bitmap top for bottom
  1071. X.SH SYNOPSIS
  1072. Xpbmfliptb [pbmfile]
  1073. X.SH DESCRIPTION
  1074. XReads a portable bitmap as input.
  1075. XFlips it top for bottom and produces a portable bitmap as output.
  1076. X.SH "SEE ALSO"
  1077. Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
  1078. Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
  1079. Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbminvert(1), pbmfliplr(1),
  1080. Xpbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
  1081. Xpbmpaste(1), pbmenlarge(1)
  1082. X.SH AUTHOR
  1083. XCopyright (C) 1988 by Jef Poskanzer.
  1084. X
  1085. XPermission to use, copy, modify, and distribute this software and its
  1086. Xdocumentation for any purpose and without fee is hereby granted, provided
  1087. Xthat the above copyright notice appear in all copies and that both that
  1088. Xcopyright notice and this permission notice appear in supporting
  1089. Xdocumentation.  This software is provided "as is" without express or
  1090. Ximplied warranty.
  1091. SHAR_EOF
  1092. if test 992 -ne "`wc -c < 'pbmfliptb.man'`"
  1093. then
  1094.     echo shar: error transmitting "'pbmfliptb.man'" '(should have been 992 characters)'
  1095. fi
  1096. fi # end of overwriting check
  1097. echo shar: extracting "'pbminvert.c'" '(1224 characters)'
  1098. if test -f 'pbminvert.c'
  1099. then
  1100.     echo shar: will not over-write existing file "'pbminvert.c'"
  1101. else
  1102. sed 's/^X//' << \SHAR_EOF > 'pbminvert.c'
  1103. X/* pbminvert.c - read a portable bitmap and invert it
  1104. X**
  1105. X** Copyright (C) 1988 by Jef Poskanzer.
  1106. X**
  1107. X** Permission to use, copy, modify, and distribute this software and its
  1108. X** documentation for any purpose and without fee is hereby granted, provided
  1109. X** that the above copyright notice appear in all copies and that both that
  1110. X** copyright notice and this permission notice appear in supporting
  1111. X** documentation.  This software is provided "as is" without express or
  1112. X** implied warranty.
  1113. X*/
  1114. X
  1115. X#include <stdio.h>
  1116. X#include "pbm.h"
  1117. X
  1118. Xmain( argc, argv )
  1119. Xint argc;
  1120. Xchar *argv[];
  1121. X    {
  1122. X    FILE *ifd;
  1123. X    bit **bits;
  1124. X    int rows, cols, row, col;
  1125. X
  1126. X    if ( argc > 2 )
  1127. X    {
  1128. X    fprintf( stderr, "usage:  %s [pbmfile]\n", argv[0] );
  1129. X    exit( 1 );
  1130. X    }
  1131. X
  1132. X    if ( argc == 2 )
  1133. X    {
  1134. X        ifd = fopen( argv[1], "r" );
  1135. X        if ( ifd == NULL )
  1136. X        {
  1137. X        fprintf( stderr, "%s: can't open.\n", argv[1] );
  1138. X        exit( 1 );
  1139. X        }
  1140. X    }
  1141. X    else
  1142. X    ifd = stdin;
  1143. X
  1144. X    bits = pbm_readpbm( ifd, &cols, &rows );
  1145. X
  1146. X    if ( ifd != stdin )
  1147. X    fclose( ifd );
  1148. X
  1149. X    for ( row = 0; row < rows; row++ )
  1150. X        for ( col = 0; col < cols; col++ )
  1151. X        bits[row][col] = ( bits[row][col] == 0 ? 1 : 0 );
  1152. X
  1153. X    pbm_writepbm( stdout, bits, cols, rows );
  1154. X
  1155. X    exit( 0 );
  1156. X    }
  1157. SHAR_EOF
  1158. if test 1224 -ne "`wc -c < 'pbminvert.c'`"
  1159. then
  1160.     echo shar: error transmitting "'pbminvert.c'" '(should have been 1224 characters)'
  1161. fi
  1162. fi # end of overwriting check
  1163. echo shar: extracting "'pbminvert.man'" '(982 characters)'
  1164. if test -f 'pbminvert.man'
  1165. then
  1166.     echo shar: will not over-write existing file "'pbminvert.man'"
  1167. else
  1168. sed 's/^X//' << \SHAR_EOF > 'pbminvert.man'
  1169. X.TH pbminvert 1 "13 February 1988"
  1170. X.SH NAME
  1171. Xpbminvert - invert a portable bitmap
  1172. X.SH SYNOPSIS
  1173. Xpbminvert [pbmfile]
  1174. X.SH DESCRIPTION
  1175. XReads a portable bitmap as input.
  1176. XInverts it black for white and produces a portable bitmap as output.
  1177. X.SH "SEE ALSO"
  1178. Xpbm(5), cbmtopbm(1), icontopbm(1), macptopbm(1), rasttopbm(1), xbmtopbm(1), xwdtopbm(1),
  1179. Xpbmtoicon(1), pbmtocbm(1), pbmtops(1), pbmtoptx(1), pbmtorast(1),
  1180. Xpbmtoxbm(1), pbmtox10bm(1), pbmtoascii(1), pbmfliplr(1),
  1181. Xpbmfliptb(1), pbmcatlr(1), pbmcattb(1), pbmcrop(1), pbmtrnspos(1), pbmcut(1),
  1182. Xpbmpaste(1), pbmenlarge(1)
  1183. X.SH AUTHOR
  1184. XCopyright (C) 1988 by Jef Poskanzer.
  1185. X
  1186. XPermission to use, copy, modify, and distribute this software and its
  1187. Xdocumentation for any purpose and without fee is hereby granted, provided
  1188. Xthat the above copyright notice appear in all copies and that both that
  1189. Xcopyright notice and this permission notice appear in supporting
  1190. Xdocumentation.  This software is provided "as is" without express or
  1191. Ximplied warranty.
  1192. SHAR_EOF
  1193. if test 982 -ne "`wc -c < 'pbminvert.man'`"
  1194. then
  1195.     echo shar: error transmitting "'pbminvert.man'" '(should have been 982 characters)'
  1196. fi
  1197. fi # end of overwriting check
  1198. #    End of shell archive
  1199. exit 0
  1200.